import apiClient from './apiClient'

export const tagService = {
  // 获取所有标签
  getAllTags: async () => {
    return await apiClient.get('/tags')
  },

  // 获取热门标签
  getHotTags: async () => {
    return await apiClient.get('/tags/hot')
  },

  // 根据ID获取标签
  getTagById: async (id) => {
    return await apiClient.get(`/tags/${id}`)
  },

  // 创建标签
  createTag: async (tagData) => {
    return await apiClient.post('/tags', tagData)
  },

  // 更新标签
  updateTag: async (id, tagData) => {
    return await apiClient.put(`/tags/${id}`, tagData)
  },

  // 删除标签
  deleteTag: async (id) => {
    return await apiClient.delete(`/tags/${id}`)
  },

  // 获取标签使用统计
  getTagStats: async () => {
    return await apiClient.get('/tags/stats')
  }
}